home *** CD-ROM | disk | FTP | other *** search
- From: bs@research.att.com
- Message-ID: <199603212110.OAA20209@ncar.ucar.EDU>
- X-Original-Date: Thu, 21 Mar 96 15:31 EST
- Path: in2.uu.net!bounce-back
- Date: 22 Mar 96 02:22:53 GMT
- Approved: fjh@cs.mu.oz.au
- Organization: -
- Newsgroups: comp.std.c++
- Subject: Re: Exception handling -- was a finally block ever considered?
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBFAgUBMVIPGOEDnX0m9pzZAQGHVgF/XnZAQUNbn0W+0U9AXCWvLko8cuGNN1cf
- KdFyasw+d7PWDokv/LqPqiyJYjhp34Vq
- =DXI8
-
- From: Fredrik Jonsson <euafjo@uab.ericsson.se> writes:
-
- > Jason D. Morris wrote:
- > >
- > > Ok, but that still doesn't answer my question. I didn't ask for a
- > > method for simulating a finally block, I asked if the committee had
- > > considered a finally block as part of the exception handling
- > > mechanism, and if they had, why it wasn't adopted.
- > >
- > > Jason
- >
- > I know the finally statement was mentioned/discussed during
- > afterwork hours at the Santa Cruz meeting but unfortunately
- > that is about it. (I agree with you that it is very convenient
- > to have the finally block, and most Borland Delphi or Java
- > programmers will agree on that.)
- >
- > Ie. the answer to your question would be no, it has not been
- > discussed, at least not as far as I know.
-
- A finally-clause on a try block was certainly considered during the
- design of the exception handling mechanisms. I considered it ad hoc
- and inelegant compared to the "resource requisition is initialization"
- technique. Also, catch(...) has some of the properties (good and bad)
- of a finally-clause. See for example sec 16.5 of D&E.
-
- - Bjarne
-
- ---
- [ comp.std.c++ is moderated. To submit articles: try just posting with ]
- [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
- [ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
- [ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
- [ Comments? mailto:std-c++-request@ncar.ucar.edu ]
-